<body>
<?php include 'header.phtml'; ?>


</div><div id="ContactEditAndDetailsView" class="AppContent SecuredEditAndDetailsView EditAndDetailsView DetailsView ModelView ConfigurableMetadataView MetadataView"><div class="wrapper"><h1><span class="truncated-title"><span class="ellipsis-content"> <?php echo $this->form->get('firstname')->getValue(); ?> <?php echo " "?> <?php echo $this->form->get('lastname')->getValue(); ?>   </span></span></h1><div class="wide form"><form onSubmit="js:return $(this).attachLoadingOnSubmit(&quot;edit-form&quot;)" id="edit-form" action="<?php echo $this->basePath();?>/Contacts/add" method="post">
<div style="display:none"><input type="hidden" value="165bf5cf6379ed29b9ccbe1b4f4b3adc852a39a1" name="YII_CSRF_TOKEN" /></div><div class="attributesContainer"><div id="CreateModelsToMergeListAndChartView" class="ModelsToMergeListAndChartView SecuredDetailsView DetailsView ModelView ConfigurableMetadataView MetadataView"style="display:none"><div class="chosen-entries"><div class="left-column clearfix"><div class="merge-title-bar"><h3>There are 0 possible matches.<a class="simple-link" onclick="js:$(&quot;#CreateModelsToMergeListAndChartView&quot;).slideUp()" href="#"><i class="icon-x"></i>Close</a></h3></div><ul class="possible-matches"></ul><div class="cards"></div></div><div class="right-column"><div class="spidergraph"></div></div></div></div><div class="left-column"><div class="panel">
<table class="form-fields">
<colgroup>
<col class="col-0" />
<col class="col-1" />
</colgroup>
<?php
		$form = $this->form;
		$form->setAttribute('action', $this->url(
     'contacts',
     array(
         'action' => 'edit',
         'id'     => $this->id,
     )
 ));
		$form->prepare(); ?>
		
<tbody>
<tr>
                                            <th>
                                                <label for="Contact_department" class="required">Department
                                                    <span class="required">*</span>
                                                </label>
                                            </th>
                                            <td colspan="1">
                                                <?php
													echo $this->formElement($form->get('department'));
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                <label for="Contact_firstName" class="required">First Name 
                                                    <span class="required">*</span>
                                                </label>
                                            </th>
                                            <td colspan="1">
                                                <?php
													echo $this->formElement($form->get('firstname'));		
												?>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <th>
                                                <label for="Contact_jobTitle">Job Title</label>
                                            </th>
                                            <td colspan="1">
                                                <?php
													echo $this->formElement($form->get('jobtitle'));
												?>
                                            </td>
                                        </tr>
										<tr>
                                            <th>
                                                <label for="Contact_lastName" class="required">Last Name</label>
                                                <span class="required">*</span>
                                            </th>
                                            <td colspan="1">
                                               <?php
													echo $this->formElement($form->get('lastname'));
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                <label for="Contact_mobilePhone">Mobile Phone</label>
                                            </th>
                                            <td colspan="1">
                                                 <?php
													echo $this->formElement($form->get('mobilephone'));
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                <label for="Contact_officePhone">Office Phone</label>
                                            </th>
                                            <td colspan="1">
                                               <?php
													echo $this->formElement($form->get('officephone'));
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                <label for="Contact_officeFax">Office Fax</label>
                                            </th>
                                            <td colspan="1">
                                               <?php
													echo $this->formElement($form->get('officefax'));
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                <label for="Contact_ownedSecurableitem_id" class="required">Owned Securable Item ID
													<span class="required">*</span>
                                                </label>
												</th>
												 <td colspan="1">
                                                <?php
													echo $this->formElement($form->get('ownedsecurableitem_id'));
												?>
                                            </td>
							
											
                                        </tr>
                                        <tr>
                                            <th>
                                                <label for="Contact_primaryAddress_id" class="required">Primary Address ID<span class="required">*</span>
                                                </label>
                                            </th>
                                            <td colspan="1">
                                              <?php
													echo $this->formElement($form->get('primaryaddress_address_id'));
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                <label for="Contact_primaryEmail_id" class="required">Primary Email ID<span class="required">*</span>
                                                </label>
                                            </th>
                                            <td colspan="1">
                                                <?php
													echo $this->formElement($form->get('primaryemail_email_id'));
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>
                                                <label for="Contact_titleCustomfield_id" class="required">Title Customfield ID<span class="required">*</span>
                                                </label>
                                            </th>
                                            <td colspan="1">
                                                <?php
													echo $this->formElement($form->get('title_customfield_id'));
												?>
                                            </td>
                                        </tr>


</tbody></table></div></div><div class="right-column"><div class="right-side-edit-view-panel"><h3>Rights and Permissions</h3><div id="owner-box"><label for="Contact_owner_id" class="required">Owner <span class="required">*</span></label><input name="Contact[owner][id]" id="Contact_owner_id" value="7" type="hidden" /><div class="has-model-select"><input onblur="clearIdFromAutoCompleteField($(this).val(), &#039;Contact_owner_id&#039;);" id="Contact_owner_name" type="text" value="Mary Smith" name="Contact_owner_name" /><a id="Contact_owner_SelectLink" href="#"><span class="model-select-icon"></span><span class="z-spinner"></span></a></div></div><label>Who can read and write</label><div class="radio-input"><input id="Contact_explicitReadWriteModelPermissions_type_0" value="" checked="checked" type="radio" name="Contact[explicitReadWriteModelPermissions][type]" /><label for="Contact_explicitReadWriteModelPermissions_type_0">Owner</label></div><div class="radio-input"><input id="Contact_explicitReadWriteModelPermissions_type_1" value="2" type="radio" name="Contact[explicitReadWriteModelPermissions][type]" /><label for="Contact_explicitReadWriteModelPermissions_type_1">Owner and users in</label>&#160;<div class="hasDropDown"><span class="select-arrow"></span><select id="Contact_explicitReadWriteModelPermissions_nonEveryoneGroup" onclick="document.getElementById(&quot;Contact_explicitReadWriteModelPermissions_type_1&quot;).checked=&quot;checked&quot;;" name="Contact[explicitReadWriteModelPermissions][nonEveryoneGroup]">
<option value="3">East</option>
<option value="5">East Channel Sales</option>
<option value="7">East Direct Sales</option>
<option value="4">West</option>
<option value="6">West Channel Sales</option>
<option value="8">West Direct Sales</option>
</select>
                                    </div></div>
                                <div class="radio-input">
                                    <input id="Contact_explicitReadWriteModelPermissions_type_2" value="1" checked="checked" type="radio" name="Contact[explicitReadWriteModelPermissions][type]" />
                                    <label for="Contact_explicitReadWriteModelPermissions_type_2">Everyone</label>
                                </div></div>
                        </div></div>
                    <div class="float-bar"><div class="view-toolbar-container clearfix dock">
                            <div class="form-toolbar"><a id="CancelLinkActionElement--25-yt2" href="ZurmoBajakan/public/contacts">
                                    <span class="z-label">Cancel</span>
                                </a>
                                <?php
                                									//echo $this->formInput($form->get('search'));
									 echo $this->formSubmit($form->get('submit'));
								?>
								
								</div></div></div><script type="text/javascript">
								/*<![CDATA[*/
function closeGamificationDashboard(){
                               $('#UserGameDashboardView').remove();
                               $('body').removeClass('gd-dashboard-active');
                               $('#header-game-dashboard-link').html('∂').toggleClass('highlighted');
                           }

                function clearIdFromAutoCompleteField(value, id)
                {
                    if (value == '')
                    {
                        $('#' + id).val('');
                    }
                }
            
jQuery(function($) {

                    jQuery("body").ajaxComplete(
                        function(event, request, options)
                        {
                            if (request.responseText == "sessionTimeout")
                            {
                                $.cookie("sessionTimeoutCookie", 1,
                                        {
                                            expires : 1,
                                            path:  "/"
                                        });
                                window.location.reload(true);
                            }
                        }
                    );
                
$('#claim-item-link').on('click', function(event){
                               event.preventDefault();
                               $(this).off('click');
                               var magicAudio = document.getElementById('collection-item-claimed');
                               magicAudio.play();
                               $('#game-notification').fadeOut(300);
                           });
$('#close-game-notification-link').click(function(event){
                               event.preventDefault();
                               $('#game-notification').fadeOut(300);
                           });
                           $('.gd-dashboard-active').on('click', function(){
                               if($('#UserGameDashboardView').length){
                                   closeGamificationDashboard();
                               }
                               return false;
                           });
$('body').on('click', '#header-game-dashboard-link', function(){jQuery.ajax({'beforeSend':function(){
                        if($("#UserGameDashboardView").length){
                            closeGamificationDashboard();
                            return false;
                        }
                        $("body").addClass("gd-dashboard-active");
                        $("#header-game-dashboard-link").html("‰").toggleClass("highlighted");
                    },'success':function(data){$("#FooterView").after(data);},'url':'/demos/stable/app/index.php/users/default/gameDashboard?id=1','cache':false});return false;});
  $(".nav li").hover(
    function () {
      if ($(this).hasClass("parent")) {
        $(this).addClass("over");
      }
    },
    function () {
      $(this).removeClass("over");
    }
  );

$("#globalSearchScope").bind("multiselectclick", function(event, ui){
                            if ($("#globalSearchScope").multiselect("widget").find(":checkbox:checked").length == 0)
                            {
                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value == "All" && !this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                            if (ui.value == "All" && ui.checked)
                            {
                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value != "All" && this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                            else if (ui.value != "All" && ui.checked)
                            {
                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value == "All" && this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                        });
                       
$('#globalSearchScope').multiselect({'selectedText':'','noneSelectedText':'','header':false,'position':{'my':'right top','at':'right bottom'}}); $(this).setupCheckboxStyling($('#globalSearchScope').parent())
$("#globalSearchInput").bind("focus", function(event, ui){
                            $("#globalSearchInput").autocomplete("option", "source", "/demos/stable/app/index.php/zurmo/default/globalSearchAutoComplete?" + $.param($("#globalSearchScope").serializeArray()));
                        });
                       
jQuery('#globalSearchInput').autocomplete({'select': function(event, ui) {if (ui.item.href.length > 0){window.location = ui.item.href;} return false;},'search': function(event, ui) { $(this).makeOrRemoveTogglableSpinner(true, "#app-search") },'open': function(event, ui) { $(this).makeOrRemoveTogglableSpinner(false, "#app-search") },'position':{'my':'right top','at':'right bottom'},'source':'/demos/stable/app/index.php/zurmo/default/globalSearchAutoComplete'});
 $("#globalSearchInput").data( "autocomplete" )._renderItem = function( ul, item ) {
                            return $( "<li></li>" ).data( "item.autocomplete", item )
                                    .append( "<a><span class=" + item.iconClass + "></span><span>" + item.label + "</span></a>" )
                                    .appendTo( ul );
                        };
$('body').on('click', '#yt0', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                //window.scrollTo(0, 0);
                jQuery('#modalContainer').dialog({
                    'title' : 'Create Task',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : 'task-dialog',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer').parent().removeClass('openingModal');
                                                     $('#modalContainer').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/demos/stable/app/index.php/tasks/default/modalCreate?modalId=modalContainer','cache':false,'success':function(html){jQuery("#modalContainer").html(html)}});return false;});

                    $(function() {
                        $('.truncated-title').ThreeDots({ max_rows:1 });
                    });
jQuery('#Contact_owner_name').autocomplete({'select':function(event, ui){ jQuery("#Contact_owner_id").val(ui.item["id"]).trigger("change");},'appendTo':$("#Contact_owner_name").parent().parent(),'search': function(event, ui)
                                  {
                                       var context = $("#Contact_owner_name").parent();
                                       $(".model-select-icon", context).fadeOut(100);
                                       $(this).makeOrRemoveTogglableSpinner(true, context);
                                  },'open': function(event, ui)
                                  {
                                       var context = $("#Contact_owner_name").parent();
                                       $(".model-select-icon", context).fadeIn(250);
                                       $(this).makeOrRemoveTogglableSpinner(false, context);
                                  },'close': function(event, ui)
                                  {
                                       var context = $("#Contact_owner_name").parent();
                                       $(".model-select-icon", context).fadeIn(250);
                                       $(this).makeOrRemoveTogglableSpinner(false, context);
                                  },'response': function(event, ui)
                                  {
                                       if (ui.content.length < 1)
                                       {
                                           var context = $("#Contact_owner_name").parent();
                                           $(".model-select-icon", context).fadeIn(250);
                                           $(this).makeOrRemoveTogglableSpinner(false, context);
                                       }
                                  },'source':'/demos/stable/app/index.php/users/default/autoComplete'});
$('body').off('click.selectLink', '#Contact_owner_SelectLink'); $('body').on('click.selectLink', '#Contact_owner_SelectLink', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer-edit-form').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer-edit-form');
                //window.scrollTo(0, 0);
                jQuery('#modalContainer-edit-form').dialog({
                    'title' : 'User Search',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : '',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer-edit-form').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer-edit-form').parent().removeClass('openingModal');
                                                     $('#modalContainer-edit-form').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/demos/stable/app/index.php/users/default/modalList?modalTransferInformation%5BsourceIdFieldId%5D=Contact_owner_id&modalTransferInformation%5BsourceNameFieldId%5D=Contact_owner_name&modalTransferInformation%5BmodalId%5D=modalContainer-edit-form&modalTransferInformation%5BsourceModelId%5D=78','cache':false,'success':function(html){jQuery("#modalContainer-edit-form").html(html)}});return false;});
$('body').on('click', 'li.selectedDupe',
                        function()
                        {
                            var id = $(this).attr('id');
                            var idArray = id.split('-');
                            $('.business-card:visible').hide();
                            $('li.selectedDupe').removeClass('selected');
                            $(this).addClass('selected');
                            $('#dupeDetailsView-' + idArray[1]).show();
                        });
                        $('body').on('change', '.dupeContactsPrimaryModel',
                            function()
                    {
                        var id = $(this).attr('id');
                        var idArray = id.split('-');
                        window.location.href = '/demos/stable/app/index.php/cs/default/details' + '?id=' + idArray[1];
                    }
                        );
                      
});
/*]]>*/
</script>
<div class="performance-info">Load time: 0.324 seconds.<br /></div></body></html>